package cn.wangzengqiang.study.designpattern.singleton;

/**
 * 懒汉式单例 （线程不安全）
 */
public class UnsafeLazyManSingleton {
    private static UnsafeLazyManSingleton instance = null;

    private UnsafeLazyManSingleton() {
    }

    public static UnsafeLazyManSingleton getInstance() {
        if (instance == null) {
            synchronized (UnsafeLazyManSingleton.class) {
                instance = new UnsafeLazyManSingleton();
            }

        }

        return instance;
    }
}
